package 力扣._7022_限制条件下元素之间的最小绝对差;

import java.util.List;

public class Solution {
    //超时
    public int minAbsoluteDifference(List<Integer> nums, int x) {
        int min = Integer.MAX_VALUE;
        for (int i = 0; i < nums.size() - x; i++) {
            for (int j = i + x; j < nums.size(); j++) {
                min = Math.min(min, Math.abs(nums.get(i) - nums.get(j)));
            }
        }
        return min;
    }
}
